<?php

header('Access-Control-Allow-Origin:*');
header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
header('Access-Control-Allow-Headers: Content-Type,Authorization');
if(strtoupper($_SERVER['REQUEST_METHOD']) === 'OPTIONS'){
    $ret = [
        'data' => [],
        'msg' => 'ok',
        'code' => 200
    ];
    die(json_encode($ret));
}

// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
